# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################
load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_library_with_info")

proto_library(
    name = "attestation_proto",
    srcs = [
        "attestation.proto",
    ],
    deps = [],
)

proto_library_with_info(
    name = "attestation_proto_with_info",
    deps = [":attestation_proto"]
)

##############################################################################
# Java
##############################################################################
load("@com_google_api_codegen//rules_gapic/java:java_gapic.bzl", "java_resource_name_proto_library")
load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")

java_proto_library(
    name = "attestation_java_proto",
    deps = [":attestation_proto"],
)

java_grpc_library(
    name = "attestation_java_grpc",
    srcs = [":attestation_proto"],
    deps = [":attestation_java_proto"],
)

java_resource_name_proto_library(
    name = "attestation_resource_name_java_proto",
    gapic_yaml = "//google/devtools/containeranalysis/v1beta1:containeranalysis_gapic.yaml",
    deps = [":attestation_proto"],
)

##############################################################################
# Go
##############################################################################
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

go_proto_library(
    name = "attestation_go_proto",
    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
    importpath = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/attestation",
    protos = [":attestation_proto_with_info"],
    deps = [],
)
